{% extends 'AnketaBundle::layout.html.twig' %}

{% block navigation %}
    {{ menu.statistics.render([season.id, 'my_comments'])|raw }}
{% endblock %}

{% block content %}
    <h1>{{ trans('response.list.moje_komentare') }}</h1>
    <p>
        {{ trans('response.list.tu_su_komentare') }}
        {% if access.statistics.canCreateResponses(season) %}
            {{ trans('response.list.pridavanie_z_vysledkov') }}
        {% endif %}
    </p>

    <div class="results-comments results-comments-official">
    {% for item in responses %}
        <div class='comment' id="odpoved{{ item.response.id }}">
            <div class="comment-top">
                <strong><a href="{{ item.section.statisticsPath }}">{{ item.section.title }}</a></strong>:
            </div>
            <p class="comment-comment">{{ item.response.comment|escape|replace({"\n": "<br />"})|raw }}</p>
            {% if access.statistics.canEditResponse(item.response) %}
            <div>
                <a href="{{ path('response_edit', {'response_id': item.response.id}) }}">{{ trans('response.list.upravit_komentar') }}</a> |
                <a href="{{ path('response_delete', {'response_id': item.response.id}) }}">{{ trans('response.list.zmazat_komentar') }}</a>
            </div>
            {% endif %}
        </div>
    {% else %}
        <p>{{ trans('response.list.ziaden_komentar_pridany') }}</p>
    {% endfor %}
    </div>
{% endblock %}
